<div class="table-header">List Business</div>
<div id="sample-table-2_wrapper" class="dataTables_wrapper">
    <?php
    $this->breadcrumbs=array(
        'Businesses'=>array('index'),
        'Verified',
    );

    Yii::app()->clientScript->registerScript('search', "
$('.search-form form').submit(function(){
	$('#business-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
    ?>
    <?php $pageSize=Yii::app()->user->getState('pageSizeBusiness',Yii::app()->params['business_per_page']);?>
    <div class="row-fluid">
        <div class="span6">
            <div id="sample-table-2_length" class="dataTables_length">
                <label>Display
                    <select name="pageSize" id="pageSize" onchange="$.fn.yiiGridView.update('business-grid',{ data:{pageSize: $(this).val() }})">
                        <option value="10" <?php if($pageSize == 10): ?>selected="selected" <?php endif;?>>10</option>
                        <option value="25" <?php if($pageSize == 25): ?>selected="selected" <?php endif;?>>25</option>
                        <option value="100" <?php if($pageSize == 100): ?>selected="selected" <?php endif;?>>100</option>
                        <option value="250" <?php if($pageSize == 250): ?>selected="selected" <?php endif;?>>250</option>
                        <option value="500" <?php if($pageSize == 500): ?>selected="selected" <?php endif;?>>500</option>
                    </select> records</label>
            </div>
        </div>
        <div class="span6">
            <div class="search-form dataTables_filter">
                <?php $this->renderPartial('_search',array(
                    'model'=>$model,
                )); ?>
            </div><!-- search-form -->
        </div>
    </div>

    <?php $this->widget('zii.widgets.grid.CGridView', array(
        'id'=>'business-grid',
        'dataProvider'=>$model->search($model->status_verified),
        'filter'=>null,
        'template' => "{items} <div class='row-fluid'><div class='span4'>{summary}</div> <div class='span8'>{pager} </div></div>",
        'hideHeader'=>false,
        'pagerCssClass'=>'dataTables_paginate paging_bootstrap pagination',
        'pager'=>array(
            'header'=>false,
            'class'=>'CLinkPager',
            'htmlOptions'=>array('class'=>''),
            'selectedPageCssClass'=>'active',
        ),
        'itemsCssClass' => 'table table-striped table-bordered table-hover',
        'rowCssClass' => false,
        'filterCssClass'=>'table_filter',
        'cssFile'=>false,
        'enableSorting'=>false,
        'columns'=>array(
            'id',
            'name',
            'address',
            array('name'=>'state', 'value'=>'$data->state->name' ),
            'status',
            array(
                'class'=>'CButtonColumn',
                'template'=>'{update}  {delete}',
            ),
        ),
    )); ?>
</div>